package top.laoshuzi.designpatterns.base.behavior.chain_of_responsibility;

import org.junit.Test;

public class Client {

    @Test
    public void operation() {

        Filter filterA = new FilterA();
        Filter filterB = new FilterB();
        Filter filterC = new FilterC();

        FilterChain chain = new FilterChain();
        chain.addLastFilter(filterB);
        chain.addLastFilter(filterC);
        chain.addFirstFilter(filterA);

        Target target = new Target("Target");

        chain.doFilter(target);
    }
}
